
<link href="<{$res_url}>/css/wap/public.css" rel="stylesheet" type="text/css">
<link href="<{$res_url}>/css/wap/home.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<{$res_url}>/js/wap/jquery.min.js"></script>
<script type="text/javascript" src="<{$res_url}>/js/wap/TouchSlide.1.1.js"></script>
<script type="text/javascript" src="<{$res_url}>/js/wap/owl.carousel.js"></script>
<script type="text/javascript" src="<{$res_url}>/js/wap/jquery.Spinner.js"></script> 

<script type="text/javascript">
    $(function () {
        $(".Spinner").Spinner({value: 1, min: 1, len: 3, max: 100});
    })



    $(document).ready(function () {
        $("#close-icon").click(function (event) {
            var e = event || window.event;
            if (e && e.stopPropagation) {
                e.stopPropagation();
            } else {
                e.cancelBubble = true;
            }
            $("footer").hide();check_sku()
            return false;
        });

        $("#owl-demo").owlCarousel({
            items: 3,
            lazyLoad: true,
            navigation: true
        });
    });</script>
<script>
    <{if $goods.skus.0.begintime}>
            function GetRTime() {
                var EndTime = new Date("<{$goods.skus.0.endtime}>");
                var NowTime = new Date();
                var t = EndTime.getTime() - NowTime.getTime();
                var d = Math.floor(t / 1000 / 60 / 60 / 24);
                var h = Math.floor(t / 1000 / 60 / 60 % 24);
                var m = Math.floor(t / 1000 / 60 % 60);
                var s = Math.floor(t / 1000 % 60);
                document.getElementById("t_d").innerHTML = d + "天";
                document.getElementById("t_h").innerHTML = h + "小时";
                document.getElementById("t_m").innerHTML = m + "分";
                document.getElementById("t_s").innerHTML = s + "秒";
            }
    setInterval(GetRTime, 0);
            <{/if}>
</script>




</head>
<body>
    <section class="warp" style="padding-bottom:65px;">
        <div class="content">
            <!--            <header>
                            <div class="can fl"><img src="<{$res_url}>/images/wap/t2.png" width="25"></div>
                            <div class="logo">商品详情</div>
                            <div class="position fr"><img src="<{$res_url}>/images/wap/t1.png" width="20"></div>
                        </header>-->
            <div class="pictext">

                <div id="slideBox" class="slideBox">
                    <div class="bd">
                        <ul>
                            <{if $goods.item_imgs}><{foreach from=$goods.item_imgs item=row}>
                            <li>
                                <img src="<{$row.big_url}>" />
                            </li>
                            <{/foreach}>
                            <{else}>
                            <li>
                                <img src="<{$goods.default_img_url}>" />
                            </li>
                            <{/if}>
                        </ul>
                    </div>

                    <div class="hd">
                        <ul></ul>
                    </div>
                </div>
                <script type="text/javascript">
                                    TouchSlide({
                                        slideCell: "#slideBox",
                                        titCell: ".hd ul", //开启自动分页 autoPage:true ，此时设置 titCell 为导航元素包裹层
                                        mainCell: ".bd ul",
                                        effect: "leftLoop",
                                        autoPage: true, //自动分页
                                        autoPlay: true //自动播放
                                    });

                </script>  

                <div class="product">
                    <div class="product_time clearfix">
                        <p><a href="javascript:void(0);"><{$goods.title}></a></p>
                        <p>
                            <{if $goods.skus.0.begintime}>
                        <div class="fr"><img src="<{$res_url}>/images/wap/t4.png" width="15px">距离结束还有<i id="t_d"></i><i id="t_h"></i><i id="t_m"></i><i  id="t_s"></i></div>
                        <{/if}>
                        <div class="fl"><em>￥<{$goods.skus.0.price}></em> <del>￥<{$goods.skus.0.market_price}></del></div>
                        </p>
                    </div>
                    <div class="product_case">
                        <ul>
                            <li><p>购物提示：</p></li>
                            <{foreach from=$goods.tip.tip_text item=tip_text}>
                            <li class="tip_text"><span><i></i><{$tip_text}></span></li>
                            <{/foreach}>
                        </ul>
                    </div>
                    <div class="product_case">
                        <ul>
                            <li><p>推荐：</p></li>
                            <li><em><{$goods.brief}></em></li>
                        </ul>
                    </div>
                    <div id="tabBox1" class="tabBox" style="width:100%;">
                        <div class="hd">
                            <ul>

                                <li<{if !$con }> class="on"<{/if}>><a href="agoods-info.html?goods_id=<{$goods.iid}>">图文详情</a><i></i></li>
                                <li<{if $con=="gg" }> class="on"<{/if}>><a id="spec_btn" href="agoods-info.html?goods_id=<{$goods.iid}>&con=gg#spec_btn">规格参数</a><i></i></li>
                                <li<{if $con=="opinions" }> class="on"<{/if}>><a id="opinions_btn" href="agoods-info.html?goods_id=<{$goods.iid}>&con=opinions#opinions_btn">口碑推荐</a></li>
                            </ul>
                        </div>
                        <div id="tabBox1-bd" class="bd">
                            <{if !$con}>
                            <div class="con" style="">
                                <div class="product_menu">
                                    <{if $goods.wapintro}><{$goods.wapintro}><{else}><{$goods.description}><{/if}>
                                </div>


                            </div><{/if}>
                            <{if $con=="gg" }>
                            <div class="con" style="">
                                <div class="product_menu">
                                    <ul>
                                        <{foreach from=$goods.spec_info item=spec}>
                                        <li><span><{$spec.spec_name}></span>
                                            <{foreach from=$spec.spec_values item=value}>
                                            <i></i><{$value.spec_value}>
                                            <{/foreach}>
                                        </li>
                                        <{/foreach}>

                                        <{foreach from=$goods.props item=prop}>
                                        <li><span><{$prop.name}>：</span><{$prop.prop_value}>
                                        </li>
                                        <{/foreach}>




                                    </ul>
                                </div>
                            </div>
                            <{/if}>
                            <{if $con=="opinions" }>
                            <div class="con" style="">
                                <{if $opco}>
                                <ul>
                                    <{foreach from=$opco item=op}>
                                    <{if $op.image}>
                                    <li>
                                        <div class="recommend_name">

                                            <b><a href="statics-pointLv.html"><img src="<{$op.avatar}>"  width="40" height="40"  style="width: inherit !important ; display:inline-block "><em><{$op.name}></em><font>LV<{$op.member_lv_id}></font></a></b>
                                        </div>
                                        <div class="recommend_info">
                                            <div class="recommend_pic" style="position:relative;">
                                                <a href='opinions-info.html?opinions_id=<{$op['id']}>'>

                                                   <{if $op['tag']}>
                                                   <{foreach from=$op['tag'] item=t}>
                                                   <div class="tag_box <{if $t.image_type=='2'}>t_right<{/if}>"  style='top:<{$t.x}>%;left:<{$t.y}>%;  position: absolute;'>
                                                        <img src="<{$res_url}>/images/wap/icon28.png" class="dot">
                                                        <span>
                                                            <{$t.image_tag}>
                                                            <em class="s_right"></em>
                                                        </span>
                                                    </div>
                                                    <{/foreach}>
                                                    <{/if}>
                                                    <img src="<{$op.image}>" width="100%">
                                                </a></div>
                                            <div class="recommend_text">
                                                <h2><a href="agoods-info.html?goods_id=<{$op.goods_id}>"><{$op['goods_name']}></a></h2>
                                                <p><span>[好物推荐]</span><{$op.content}></p>
                                                <div align="right"><{$op.created}></div>
                                            </div>
                                            <div class="share">
                                                <a href="#"><img src="<{$res_url}>/images/wap/t6.jpg">评论（<{$op.c_num}>）</a><a href="#"><img src="<{$res_url}>/images/wap/t7.jpg"><{$op.p_num}></a><a href="#"><img src="<{$res_url}>/images/wap/t8.jpg">分享</a>
                                            </div>
                                        </div>
                                    </li>
                                    <{else}>
                                    <li>
                                        <div class="share_hd">
                                            <div class="recommend_name">

                                                <b><a href="statics-pointLv.html"><img src="<{$op.avatar}>" width="40" height="40"   style="width: inherit !important ; display:inline-block"><em><{$op.name}></em><font>LV<{$op.member_lv_id}></font></a></b>
                                            </div>
                                            <div class="share_text">
                                                <p><{$op.content}></p>
                                                <div align="right"><{$op.created}></div>
                                            </div>
                                        </div>
                                    </li>
                                    <{/if}>
                                    <{/foreach}>

                                </ul>
                                <{/if}>
                            </div>
                            <{/if}>
                        </div>
                        <div class="product_name clearfix">

                            <div class="fl">
                                <span><img src="<{$goods.brand.brand_logo|storager:'l'}>"></span>品牌：<{$goods.brand.brand_name}>
                            </div>
                        </div>

                        <{if $goods.goods_link}>
                        <div class="product_love">
                            <h4>你可能还喜欢</h4>
                            <ul class="owl-carousel clearfix" id="owl-demo" >
                                <{foreach from=$goods.goods_link item=link}>
                                <li class="item">
                                    <p><a href="agoods-info.html?goods_id=<{$link.goods_id}>&from=<{if $app}>app<{/if}>"><img class="lazyOwl" width="99px" height="108px" src="<{$link.image_default}>"></a></p>
                                    <p><a class="stn" href="javascript:void(0);"><{$link.name}></a></p>
                                    <p><em>￥<{$link.price}></em></p>
                                </li>
                                <{/foreach}>
                            </ul>
                        </div>
                        <{/if}>

                    </div>
                </div>



                <!-----商品属性选择弹出层----->
                <div class="Attributes">
                    <dl>
                        <dt><img src="<{$goods.default_img_url}>" width="50" height="50"></dt>
                        <dd>
                            <h2><{$goods.title}></h2>
                        </dd>
                    </dl>


                    <ul id="spec_info">
                        <{foreach from=$goods.spec_info item=item name=name}>
                        <li class="spec_li">
                            <span><{$item.spec_name}></span>
                            <p>
                                <{foreach from=$item.spec_values item=spec}>
                                <a href="javascript:" data-gg='<{$spec.properties}>' class="<{if in_array($spec.properties,$goods.default_properties)}>active<{/if}>">
                                    <{if $item.spec_type=='image'}>
                                    <img title="<{$spec.spec_value}>" alt="<{$spec.spec_value}>" src="<{$spec.spec_goods_images}>" width="40" height="40">
                                    <{else}>
                                    <{$spec.spec_value}>
                                    <{/if}>
                                </a>
                                <{/foreach}>
                            </p>
                        </li>
                        <{/foreach}>

                        <li>
                            <span>数量</span>
                            <div class="Spinner" id='sku_num'></div>
                        </li>
                    </ul>
                    <form action="amember-cart.html" method="post">
                    <input type="hidden" name='sku' id='sku'>
                    <input type='hidden' name='skunum' id='skunum'>
                    <input type='hidden' name='goods_id' value="<{$goods.iid}>">
                    <div class="submit"><a href="javascript:;">取消</a><a href="javascript:check_sku();$('form').submit();">确定</a></div>
                    </form>
                </div>
                <div class="mask"></div>
                <script type="text/javascript">
                        function check_sku(){
                            var str = "";
                            $("#spec_info .active").each(function(){
                                str += $(this).attr("data-gg")+";";
                            });
                            $("#sku").val(str);
                            $("#skunum").val($("#sku_num input").val());
                        }
                            $(function () {

                                var json_sku = eval('<{$sku}>');

                                //alert(json_sku[0].sku_id);


                                $(".logo_bg").click(function () {
                                    $(".Attributes").animate({bottom: 0})
                                    $(".mask").fadeIn()
                                    $("footer").fadeOut()
                                    check_sku();
                                })
                                $(".submit a:first-child").click(function () {
                                    $(".Attributes").animate({bottom: -100 + "%"})
                                    $(".mask").fadeOut()
                                    $("footer").fadeIn()
                                    check_sku()
                                })


                                $("#spec_info .spec_li a").click(function (e) {
                                    $(this).siblings().removeClass("active");
                                    $(this).addClass("active");
                                    check_sku()
                                });

                                check_sku();
                            })
                            function getamount(){}
                </script>
                <{wap_require file="block/share.html"}>
                <footer>
                    <div class="fl"><a href="cart.html"><img src="<{$res_url}>/images/wap/t3.png" width="25"></a></div><!--收藏夹-->
                    <div class="logo_bg" >加入购物车</div>
                    <div class="fr"><a href="cart.html"><img src="<{$res_url}>/images/wap/nav_icon3_01.png" width="25"></a></div><!--购物车-->
                </footer>
                <!--                <footer style="line-height: 0;height: 44px">
                                    <a href="http://fir.im/apps/55c883f100fc742319000013/info"><img src="<{$res_url}>/images/wap/footer.jpg" width="100%"></a>
                                </footer>   -->

            </div>
        </div>
    </section>

